const apiUrl = {
    search_history_list: 'v3sns/search_history/get_history_list',
    search_history: 'v3sns/search_history',
    article_mystate: 'v3sns/article_mystate',
    article_shield: 'v3sns/article_shield', // 不感兴趣
    article_appoint: 'v3sns/article_appoint', // 预约
    article_vote: 'v3sns/article_vote', // 投票
    article_vote_user: 'v3sns/article_vote_user',
    article_collect: 'v3sns/article_collect',
    article_comment: 'v3sns/article_comment',
    article_comment_like: 'v3sns/article_comment_like',
    article_comment: 'v3sns/article_comment',
    article_like: 'v3sns/article_like',

    article_all: 'v3sns/article',
    article_outline: 'v3sns/article_outline',
    /*
       * 
       */
    bussns_dynamic: 'v3sns/bussns_dynamic',
    bussns_info: 'v3sns/bussns',
    home_index: 'v3sns/app_index',
    /**
     * 
     */
    cms_sett_tags: 'v3sns/sett_tagsdiy',
    cms_settplat_cat: 'v3sns/settplat_category',
};
let apiFunc = {

};
for (const key in apiUrl) {
    apiFunc['get_' + key] = (p) => {
        // console.log('get_', apiUrl[key], p);
    }
    apiFunc['post_' + key] = (p) => {
        // console.log('post_', apiUrl[key], p);
    }
}
let aClass = {
    getFlag: function (apiFlag) {
        return function (apiParam) {
            aClass.get(apiFlag, apiParam);
        }
        // return (function (apiParam) {
        //     this.get(apiFlag, apiParam);
        // })(this, apiFlag);
    },
    get: function (apiFlag, apiParam) {
        //console.log('--------------------', apiFlag, apiParam);
    }
}
// 常规调用
// $request.get('CMS_SETT_CMS_SETT_',apiParam);
// 方法2
// $request.getFlag('CMS_SETT_CMS_SETT_').get();

// let apiFunc = []();

// aClassa.a().b();

// 
let tabsConfig = [{
    tabTitle: 'XXX',
    apiFunc: aClass.getFlag('CMS_SETT_CMS_SETT_'),
}]

tabsConfig[0].apiFunc({
    'order_type': 'eeeeeeeeeeeeeeee'
});
aClass.getFlag('CMS_SETT_CMS_SETT_')({
    'order_type': 'eeeeeeeeeeeeeeee'
})

export default apiFunc;